package com.bao.work;

import java.util.InputMismatchException;
import java.util.Scanner;

/**
 * @author baoye
 * @date 2024-07-24/17:17
 */
public class StringClass02 {
    public static void main(String[] args) {
        System.out.println("输入一个QQ号");
        int qq=0;
        try{
            qq=new Scanner(System.in).nextInt();
        }catch (InputMismatchException IE){
            System.out.println("QQ号只能是数字");
        }

        System.out.println("这个QQ号是:"+qqYes(Integer.toString(qq)));
    }

    public static boolean qqYes(String str) {
        return str.length()>=5&&str.length()<=12&&!str.startsWith("0");
    }
}
